package com.open.rbac.model.entity.sys;


import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLRestriction;

import com.open.center.jpa.model.entity.IdEntity;

@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@DynamicUpdate
@SQLRestriction("is_deleted = false")
@SQLDelete(sql = "UPDATE role_user_rel SET is_deleted = 1 WHERE id = ?")
@Entity(name = "role_user_rel")
public class RoleUserRel extends IdEntity {

    @Column(name = "role_id", nullable = false, length = 36)
    private String roleId;

    @Column(name = "user_id", nullable = false, length = 36)
    private String userId;


}
